<template>
	<view class="container">
		
		<view class="logo-view">
			<image src="../../static/jitang.png"></image>
		</view>
		
		<view class="content-view">
			{{content}}
		</view>
		
		<view class="button-view">
			<button id="button-again" type="default" @click="getContent()">再来一碗！</ssbutton>
		</view>
		
	</view>
</template>

<script>
	export default {
		data() {
			return {
				content: ''
			}
		},
		
		onLoad() {
			this.getContent();
		},
		
		methods: {
			// 获取数据
			getContent() {
				uni.request({
					url:'http://duyan.test/api.php',
					success: (res) => {
						if (res.data.data.content) {
							this.content = res.data.data.content;
						}
					}
				})
			}
			
		}
	}
</script>

<style>
page {
	background-color: #66CC99;
	color: #666666;
}

.container {
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	margin: 50rpx;
	font-size: 34rpx;
	min-height: 900rpx;
	border-radius: 20rpx;
	background-color: #fdfbfb;
}

.content-view {
	margin: 50rpx 30rpx 30rpx 30rpx;
	padding: 10rpx;
	text-indent: 74rpx;
	line-height: 60rpx;
}

.button-view {
	align-self: center;
	margin-bottom: 50rpx;
}

#button-again {
	background-color: #66CC99;
	color: #FFFFFF;
}

</style>
